home *** CD-ROM | disk | FTP | other *** search
- Path: Norway.EU.net!usenet
- From: patrick.hanevold@login.eunet.no (Patrick Hanevold)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: doubling pixels horizontally
- Date: 24 Feb 1996 17:02:39 GMT
- Organization: EUnet Norway
- Message-ID: <2637.6627T383T87@login.eunet.no>
- References: <4f4ibc$gl9@news.cs.tu-berlin.de> <591.6610T1165T2102@login.eunet.no><1045.6611T753T2256@vip.cybercity.dk><4faoe1$47@sunsystem5.informatik.tu-muenchen.de><2991.6612T1034T625@vip.cybercity.dk><576.6613T1070T1730@login.eunet.no><1257.6614T57T922@vip.cybercity.dk><1982.6617T1096T103@ifi.uio.no><4gbjg3$104@sunsystem5.informatik.tu-muenchen.de><4518.6625T1142T92@ifi.uio.no>
- <5073.6626T469T1290@login.eunet.no> <2824.6626T859T1819@ifi.uio.no>
- NNTP-Posting-Host: pc8.asker-pm2-1.eunet.no
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
-
- >>Like using structures. :)
- >Yes, that's good! :)
- But not good enough for you? :)
- Well.. you have used more structures latly.
-
- >>>[..........]
- >>>mf256genhi:
- >>> move.w d3,(a0)+ : addq.w #2,d3 : move.l d0,(a0)+ ;store hiwd ! -2(a0)
- >>> move.w d3,-2(a0) : addq.w #2,d3 : move.w d0,(a0)+ ;store lowd
- >>>;every 2nd plane same data
- >>> move.w d3,(a0)+ : addq.w #2,d3 : move.l d0,(a0)+ ;store hiwd ! -2(a0)
- >>> move.w d3,-2(a0) : addq.w #2,d3 : move.w d0,(a0)+ ;store lowd
- >>>[...]
- >>> move.l #$00e1fffe,d4 : or.l d2,d4 ;WAS: 00df
- >>> movem.l (sp)+,d0-d7/a1-a6 ;a0=(ptr)copl
- >>> rts
- >>Whow! What a mess. :)
- >I don't think you are the only one which agree's about that! ;)
- Maby resourcing would be easyer? :)
- Hmm.. hope I/we dont make anyone angry.
-
- >>He forgot that it was 2xn
- >He probably did.
-
- >>Hmm.. Yes you do. Its tha same locker we have. Exept we MAY have found a
- >>solution. Guess it will lock when I implement it in our world engine. :)
- >Ohh..like you did! I thought it was that the CPU locked while blitting.
-
- >There is the solution(not to you, but the guy with the problem)
-
- >If you set a flag in CleanUp: and are polling this flag with CPU to see if
- >the blitter is finish. It might never finish because you task uses all the
- >CPU- time. and CleanUp is never run.
-
- >Don't do this:
-
- >.QCleanup:
- > move.l #-1,_BlitterIsDone
- > moveq #0,d0
- > rts
-
- >and this
-
- >while(!BlitterIsDone); //infinite wait loop.
-
- >------------------------------------------------------
- >Send a signal instead!
-
- >Here is my code. (It works!)
-
- >.QCleanUp:
- > move.l #-1,_BlitterIsDone
- > movem.l d0-a6,-(sp)
- > move.l _BltPort,a0
- > moveq.l #0,d0
- > move.b MP_SIGBIT(a0),d1
- > bset d1,d0
- > move.l 4.w,a6
- > move.l _Task,a1
- > CALL Signal(a6)
- > movem.l (sp)+,d0-a6
-
- > moveq #0,d0
- > rts
-
- >And this:
-
- >while(!BlitterIsDone)
- > Wait(1l<<(BltPort->mp_SigBit));
-
-
- >Now your task will be in wait-state until the blitter is finished.
-
- >Problem solved! :)
-
- Well, why do that peace of code get executed then, and not the other one?
- Ahh... now i know. Its the damn wait loop that locks the task, so the task
- gets bussy in the wait loop, and never gets to the cleanup routine.
- I stil think its a bug in QBlit. It should be called from from the blit
- interrupt. Waiting with a test loop insnt that OS friendly though.
- There is a solution though, with out signaling the task, but who wants to
- do that anyway.
-
- <sb>Patrick Hanevold - Virtual Reality developer
- <sb>patrick.hanevold@login.eunet.no
- <sb>Amiga and official Be developer
-
-